package com.qtest.qandroid.dao;

import com.qtest.qandroid.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author Yu
 * @time 2019/11/25 14:06
 */

@Mapper
@Repository
public interface Userdao {
     User quaryByName(String name);

     Boolean addUser(User user);

     Boolean addAttendance(AttendanceJob attendanceJob);

     AttendanceJob queryAttendance(String attendanceNumber);

     void stuAttendance(AttendanceRecord attendanceRecord);

     void updateStuAttendance(@Param("attendanceRecord") AttendanceRecord attendanceRecord,@Param("attendanceId") String attendanceId);

     AttendanceRecord queryByName(String record);

     User login(@Param("userId") String userId, @Param("password") String password,@Param("userType") String userType);

     List<User> selectAllStudentBelowCourse(String name);

     List<User> allStudentBleowCourse(String courseId);

     List<StudentRecord> selectAllRecordFromOneCourse(@Param("userId") String userId, @Param("courseId") String courseId);

     List<AttendanceJob> selectAllAttendanceJob(String courseId);

     List<StudentStatus> selectAllRecordFromCourse(String attendanceId);

     AttendanceJob newAtten(String courseId);

     Course courseMessage(Integer courseId);

     void stopAttendance(@Param("courseId") String courseId,@Param("attendanceId") Integer attendanceId);

     AttendanceRecord attendanceRecordIs(@Param("attendanceId") Integer attendanceId, @Param("userId") String userId);
}
